package com.csun.cmny.provider.service;


import com.csun.cmny.base.dto.LoginAuthDto;
import com.csun.cmny.core.support.IService;
import com.csun.cmny.provider.dto.OldmanQueryDto;
import com.csun.cmny.provider.model.domain.OmcOldManSupplement;
import com.csun.cmny.provider.model.dto.*;
import com.csun.cmny.provider.model.dto.customerArchives.OldmanArchivesQueryDto;
import com.csun.cmny.provider.model.dto.message.OldmanInQueryDto;
import com.csun.cmny.provider.model.dto.oldmanApp.AppOldmanDto;
import com.csun.cmny.provider.model.vo.*;
import com.csun.cmny.provider.model.vo.customerArchives.OldmanArchivesListVo;
import com.csun.cmny.provider.model.vo.message.OldmanInVo;
import com.csun.cmny.provider.pojo.Oldman;
import com.csun.cmny.provider.vo.*;
import com.csun.cmny.provider.vo.VolunteerVo;
import com.github.pagehelper.PageInfo;

import java.util.List;
import java.util.Map;

public interface OldmanService  {
    /**
     * 查询老人
     * author:liqian
     * date:2018-11-06 14:07
     */
    Oldman selectByOld(Oldman oldman);
    /**
     * 添加老人
     * author:liqian
     * date:2018-11-06 14:12
     */
    int insert(Oldman oldman);
    /**
     * 删除老人
     * author:liqian
     * date:2018-11-06 14:16
     */
    int insertSelective(Oldman oldman);
    int deleteByOldId(Integer oldmanId);
    /**
     * 修改老人
     * author:liqian
     * date:2018-11-06 14:26
     */
    int updateByOldId(Oldman oldman);
    /**
     * 根据条件查询社区登记的老人
     * author:liqian
     * date:2018-11-06 14:35
     */
    List<Map<String,Object>> showAll(Map<String,Object> queryMap);
    List<Map<String,Object>> showIn(Map<String,Object> queryMap);

    Oldman checkOldmanbelong(OldmanRpcDto oldmanRpcDto);

    /**
     * query oldman address
     *
     * @param oldmanAddressQueryDto oldman address query dto
     *
     * @return  the list.
     */
    List<OldmanAddressVo> queryOldmanAddress(OldmanAddressQueryDto oldmanAddressQueryDto);

    /**
     * query oldman not bind watch list
     *
     * @param oldmanNotBindWatchQueryDto    oldman not bind watch query dto
     *
     * @return  the list
     */
    PageInfo queryOldmanNotBindWatchList(OldmanNotBindWatchQueryDto oldmanNotBindWatchQueryDto);

    /**
     * query oldman bed room building list all
     *
     * @param oldmanIdList  oldman id list
     *
     * @return  the list.
     */
    List<OldmanBedRoomBuildingVo> queryOldmanBedRoomBuildingList(List<Integer> oldmanIdList);

    /**
     * query bed room building oldman list
     *
     * @param bedIdList bed id list
     *
     * @return  the list.
     */
    List<OldmanBedRoomBuildingVo> queryBedRoomBuildingOldmanList(List<Integer> bedIdList);

    /**
     * query bed room building oldman list by room id
     *
     * @param roomId    room id
     *
     * @return  the list.
     */
    List<OldmanBedRoomBuildingVo> queryBedRoomBuildingOldmanListByRoomId(Integer roomId);

    Oldman selectDescByOld(Oldman oldman);

    List<Oldman> selectSelective(Oldman oldman);

    /**
     * query oldman bed room building by oldman id
     *
     * @param oldmanId  oldman id
     *
     * @return
     */
    OldmanBedRoomBuildingVo queryOldmanBedRoomBuildingByOldmanId(Integer oldmanId);

    /**
     * query oldman bed room building by bed id
     *
     * @param bedId
     *
     * @return
     */
    OldmanBedRoomBuildingVo queryOldmanBedRoomBuildingByBedId(Integer bedId);


    //根据日期查询老人生日
    List<OldManVo> queryOldManBirthdayByDay(Map<String,Object> queryParam);

    //根据月份查询老人生日
    List<OldManVo> queryOldManBirthdayByMonth(Map<String,Object> queryParam);

    //查询老人一周生日
    List<OldManVo> selectByWeek(Map<String, Object> queryParam);

    //根据ID查询老人的信息及其额外信息
    OldManSupVo selectOldManSupByOld(Oldman oldman);

    //老人及额外信息查询所有
    List<OldManSupVo> showOldManSupAll(Map<String, Object> queryParam);

    //老人及额外信息查询所有（待评估，待缴费，已入院）
    List<OldManSupVo> showOldManSupIn(Map<String, Object> queryParam);

    /**
     * 根据姓名模糊查询老人信息--现在评估模块使用
     * @param omcOldManDto
     * @return
     */
    List<CacOldManVo> showCacOldMan(OmcOldManDto omcOldManDto);


    /**
     * 查询身份证是否重复
     * @param queryMap
     * @return
     */
    boolean queryIdCardRepet(Map<String, Object> queryMap);

    /**
     * 老人统计
     * @param: [groupId]
     * @return: java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
     */
    Map<String, Object> oldmanCount(Long groupId);

    /**
     * 查询机查询老人信息
     * @param: [oldmanId, loginAuthDto]
     * @return: com.csun.cmny.provider.model.vo.QueryMachineOldInfoVo
     */
    QueryMachineOldInfoVo getOldmanInfoByOldmanId(Long oldmanId, LoginAuthDto loginAuthDto);

    /**
     * 查询机查询老人列表
     * @param: [oldmanQueryDto, loginAuthDto]
     * @return: com.github.pagehelper.PageInfo
     */
    PageInfo queryOldmanList(OldmanQueryDto oldmanQueryDto, LoginAuthDto loginAuthDto);

    /**
     * 老人app添加老人
     * @param: [dmcPersonMainDto]
     * @return: Long
     * @param appOldmanDto
     * @param loginAuthDto
     */
    Integer oldmanAppAddOldman(AppOldmanDto appOldmanDto, LoginAuthDto loginAuthDto);

    /**
     * 获取当前用户绑定的老人
     * @param: [loginAuthDto]
     * @return: java.util.List<com.csun.cmny.provider.vo.OldManVo>
     */
    List<OldManVo> queryBoundOldmanList(LoginAuthDto loginAuthDto);

    /**
     * 修改app老人信息
     * @param: [appOldmanDto, loginAuthDto]
     * @return: java.lang.Integer
     */
    Integer editAppOldmanInfo(AppOldmanDto appOldmanDto, LoginAuthDto loginAuthDto);

    /**
     * 查询院内老人id集合
     * @param: [groupId]
     * @return: java.util.List<java.lang.Integer>
     */
    List<Integer> queryInOldmanIdList(Long groupId);

    Integer checkOut(Oldman oldman);

    /**
     * 修改入院老人服务类别与护理级别
     * @param omcOldManSupplement
     * @return
     */
    int updateByOldType(OmcOldManSupplement omcOldManSupplement);

    /**
     * 查询入院老人服务类别与护理级别
     * @param oldmanId
     * @return
     */
    List<OldManTypeStatusVo> selectByOldType(Integer oldmanId);

    /**
     * 按登录人身份查询入院流程待办事项状态码
     * @param: [loginAuthDto]
     * @return: java.util.List<java.lang.Integer>
     */
    List<Integer> queryCurTaskStates(LoginAuthDto loginAuthDto);

    /**
     * 根据评估记录更新老人状态
     * @param: [cacOldmanDto]
     * @return: java.lang.Integer
     */
    Integer updateOldmanByEvaluate(CacOldmanDto cacOldmanDto);

    /**
     * 查询老人状态
     * @param: [queryDto]
     * @return: java.util.List<com.csun.cmny.provider.model.vo.message.OldmanInVo>
     */
    List<OldmanInVo> queryOldmanInCurTaskList(OldmanInQueryDto queryDto);

    /**
     * 查询超过六个月未评估老人的信息
     * @param: [oldmanIdList]
     * @return: java.util.List<com.csun.cmny.provider.model.vo.message.OldmanInVo>
     */
    List<OldmanInVo> queryNeedDailyEvaluateOldmanList(List<Integer> oldmanIdList);

    /**
     * 查询老人列表
     *
     * @return
     */
    List<OldmanRpcVo> queryOldmanByGroupIdAndStatusList(OldmanInQueryDto oldmanInQueryDto);

    /**
     * 查询老人异常信息
     *
     * @return
     */
    OldmanExceptionVo queryOldmanException(Long oldmanId, LoginAuthDto loginAuthDto);

    /**
     * query oldman bed room building vo by room no and bed no
     *
     * @param roomNo    the room no
     * @param bedNo     the bed no
     *
     * @return  the oldman bed room building vo
     */
    OldmanBedRoomBuildingVo queryOldmanBedRoomBuildingByRoomNoAndBedNo(String roomNo, String bedNo);

    /**
     * 通过老人编号查询
     * @param oldman
     * @return
     */
    List<Oldman> selectByNo(Oldman oldman);

    List<OldmanArchivesListVo> selectQueryOldman(OldmanArchivesQueryDto oldmanArchivesQueryDto);

    Oldman select(Oldman old);

    /*
    * 老人分页查询
    * */
    PageInfo listPage(com.csun.cmny.provider.model.dto.OldmanQueryDto oldmanQueryDto, LoginAuthDto loginAuthDto);

    List<OldManSupVo> selectOldManByExcel(OldManSelectDto oldManSelectDto);
    /*
     * 大数据平台注册用户占比查询
     * */
    List<PercentVo> selectByGroup(Long groupId);
    /*
     * 大数据平台健康占比亚健康展示
     * */
    List<PercentVo> selectByHealth(Long groupId);
    /*
     * 大数据平台居家养老服务展示
     * */
    List<PercentVo> selectByService(Long groupId);
    /*
     * 大数据平台居家养老服务展示
     * */
    List<OlderNumVo> selectOldmanByNurseHome(OlderNumVo olderNumVo);
    /*
     * 大数据平台居家养老服务展示-居家服务数据
     * */
    List<ServiceOrderVo> selectServiceByNurseHome(Long groupId);
    /*
     * 大数据平台居家养老服务展示-居家服务数据
     * */
    List<ServiceOrderVO> selectOrderByNurseHome(ServiceOrderVO serviceOrderVO);
    /*
     * 集团化查询老人信息
     * */
    List<OldManSupVo> selectAllOldman(OldManSupVo oldManSupVo);
    /*
     * 老人咨询查询
     * */
    List<OldmanAdvisoryVo> selectAdvisory(OldmanAdvisoryVo oldmanAdvisoryVo);
    /**
     * 查询首页老人分类占比
     * @return Wrapper
     * @author HD
     * @date 2021/11/26 13:54
     */
    OldmanIndexVo selectOldmanIndex(Long groupId);
}
